package erfgame.frontend.desktop.view.terrain;

import java.awt.Component;
import java.awt.event.ActionListener;

import erfgame.core.world.World;

import erfgame.frontend.desktop.view.layer.LayerView;
import erfgame.frontend.desktop.view.terrain.iso.IsometricTerrainView;

@SuppressWarnings("serial")
public class GameTerrainView extends LayerView {


	private IsometricTerrainView isometricTerrainView;
	
	public GameTerrainView( IsometricTerrainView isometricTerrainView ) {
		super( 1, new Component[]{ isometricTerrainView } );
		this.isometricTerrainView = isometricTerrainView;
	}
	
	public IsometricTerrainView getIsometricTerrainView() {
		return this.isometricTerrainView;
	}
	
	public void setCurrentWorld( World world ) {
		this.isometricTerrainView.setCurrentWorld(world);
		this.isometricTerrainView.rebuildBlocks();
		this.isometricTerrainView.requestFocus();

	}
	
	public void setCloseActionListener( ActionListener l ) {
		// TODO : not entirely right
		this.isometricTerrainView.setCloseActionListener(l);
	}
}
